<?php 
ob_start();

if(!isset($_SESSION))
{
    session_start() ;
}
    require_once('../../../../include/inc_config.php') ;
?>
<?php 
mysql_select_db($database_microassur, $microassur) ;
if(isset($_GET['Identifiant_rib']))
{ 
    mysql_query("START TRANSACTION");
    $req=mysql_query("update contrat set Identifiant_rib='".$_GET['Identifiant_rib']."' where Identifiant_contrat='".$_GET['Identifiant_contrat']."'") or die(mysql_error()) ;

    $zUrlReturn  = 'index.php?Identifiant_personne=' . $_GET['Identifiant_personne'] ;
    $zUrlReturn .= '&Identifiant_contrat=' . $_GET['Identifiant_contrat'] ;

    if($req) 
    { 
        $zUrlReturn .= '&rattacher=1' ;
        mysql_query("commit") ;
        header("location: " . $zUrlReturn ) ;
    }
    else 
    { 
        $zUrlReturn .= '&rattacher=0' ;
        mysql_query("rollback") ;
        header("location: " . $zUrlReturn ) ;
    }
}
?>